import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
import { Cascader as AntdCascader } from 'antd';
import React from 'react';
import { useFieldContext } from '../../../contexts/FieldContext';
import createField from '../../../createField';
var _excluded = ['children'];
var Cascader = function Cascader(_ref) {
  var children = _ref.children,
    props = _objectWithoutProperties(_ref, _excluded);
  var _useFieldContext = useFieldContext(),
    label = _useFieldContext.label;
  return /*#__PURE__*/ React.createElement(
    AntdCascader,
    _objectSpread(
      {
        placeholder: '\u8BF7\u9009\u62E9'.concat(label || ''),
      },
      props,
    ),
    children,
  );
};
export default createField(Cascader);
